package com.wh.proxy;

import sun.util.logging.resources.logging;

public class UserServiceProxy implements UserService {

    UserServiceImpl userService=new UserServiceImpl();

    public void setUserService(UserServiceImpl userService) {
        this.userService = userService;
    }

    public void add() {
        log("add...");
        userService.add();
    }

    public void update() {
        log("add...");
        userService.update();
    }

    public void delete() {
        log("delete...");
        userService.delete();
    }

    public void query() {
        log("query...");
        userService.query();
    }

    public void log(String msg){
        System.out.println("logging..."+msg);
    }
}
